import { GameClient } from "./gameClient";
import { WsClient } from "tsrpc";

/**
 * 获取游戏客户端连接,会自动断线重连
 * @param serverUrl 服务器地址
 * @returns 
 */
export function getGameClient(serverUrl: string): GameClient {
    return new GameClient((proto, opt) => {
        return new WsClient(proto, opt);
    }, serverUrl);
}
